package cn.liyicun.cp.cpweb.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class MoneyLog implements Serializable {
    private Long id;

    private Long uid;

    private String type;

    private String typeId;

    private Date createTime;

    private BigDecimal beforeMoney;

    private BigDecimal changeMoney;

    private BigDecimal afterMoney;

    private String locking;

    private String remark;

    private static final long serialVersionUID = 1L;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getUid() {
        return uid;
    }

    public void setUid(Long uid) {
        this.uid = uid;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeId() {
        return typeId;
    }

    public void setTypeId(String typeId) {
        this.typeId = typeId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public BigDecimal getBeforeMoney() {
        return beforeMoney;
    }

    public void setBeforeMoney(BigDecimal beforeMoney) {
        this.beforeMoney = beforeMoney;
    }

    public BigDecimal getChangeMoney() {
        return changeMoney;
    }

    public void setChangeMoney(BigDecimal changeMoney) {
        this.changeMoney = changeMoney;
    }

    public BigDecimal getAfterMoney() {
        return afterMoney;
    }

    public void setAfterMoney(BigDecimal afterMoney) {
        this.afterMoney = afterMoney;
    }

    public String getLocking() {
        return locking;
    }

    public void setLocking(String locking) {
        this.locking = locking;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", uid=").append(uid);
        sb.append(", type=").append(type);
        sb.append(", typeId=").append(typeId);
        sb.append(", createTime=").append(createTime);
        sb.append(", beforeMoney=").append(beforeMoney);
        sb.append(", changeMoney=").append(changeMoney);
        sb.append(", afterMoney=").append(afterMoney);
        sb.append(", locking=").append(locking);
        sb.append(", remark=").append(remark);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        MoneyLog other = (MoneyLog) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
            && (this.getTypeId() == null ? other.getTypeId() == null : this.getTypeId().equals(other.getTypeId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getBeforeMoney() == null ? other.getBeforeMoney() == null : this.getBeforeMoney().equals(other.getBeforeMoney()))
            && (this.getChangeMoney() == null ? other.getChangeMoney() == null : this.getChangeMoney().equals(other.getChangeMoney()))
            && (this.getAfterMoney() == null ? other.getAfterMoney() == null : this.getAfterMoney().equals(other.getAfterMoney()))
            && (this.getLocking() == null ? other.getLocking() == null : this.getLocking().equals(other.getLocking()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
        result = prime * result + ((getTypeId() == null) ? 0 : getTypeId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getBeforeMoney() == null) ? 0 : getBeforeMoney().hashCode());
        result = prime * result + ((getChangeMoney() == null) ? 0 : getChangeMoney().hashCode());
        result = prime * result + ((getAfterMoney() == null) ? 0 : getAfterMoney().hashCode());
        result = prime * result + ((getLocking() == null) ? 0 : getLocking().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }
}